package com.example.demo;

import com.github.yhqy.datasource.DAO;
import com.github.yhqy.datasource.annotation.Did;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author xchen
 * @date 2019/8/6 10:26
 */
@Mapper
@Repository
public interface TestMapper extends DAO {

    @Select(" select * from datasource where id = #{id} ")
    DataSourceDO getById(@Param("id") Integer id);

    @Select(" select * from user limit 1")
    User queryUser(@Did Integer datasourceId);


}
